package org.example.controller;

import org.example.bean.Student;
import org.example.service.StudentService;
import org.example.service.impl.StudentServiceImpl;
import org.junit.Test;

import java.util.List;

public class StudentController {
    private StudentService service = new StudentServiceImpl();


    @Test
    public void selectAll(){
        List<Student> studentList = service.selectAll();
        studentList.forEach(System.out :: println);
    }

    public void selectById(){
        System.out.println(service.selectById(3));
    }

    public void insret(){
        System.out.println(new Student(6,"ss",12));
    }

    public void update(){
        System.out.println(new Student(6,"dd",22));
    }

    public void delete(){
        service.delete(6);
    }
}
